home *** CD-ROM | disk | FTP | other *** search
/ Supercompiler 1997 / SUPERCOMPILER97.iso / Delphi 3.0 / DATA.Z / chartfx3.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1997-01-30  |  37.7 KB  |  967 lines

  1. unit chartfx3;
  2.  
  3. { ChartFX 2.0 OLE Custom Control }
  4. { Version 2.0 }
  5.  
  6. { Conversion log:
  7. Error: 'Type' is a reserved word. _DChartfx.Type changed to 'Type' is a reserved word_
  8. Error: 'Const' is a reserved word. _DChartfx.Const changed to 'Const' is a reserved word_
  9.  }
  10.  
  11. interface
  12.  
  13. uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL;
  14.  
  15. const
  16.   LIBID_ChartfxLib: TGUID = '{8996B0A4-D7BE-101B-8650-00AA003A5593}';
  17.  
  18. const
  19.  
  20. { PointType Property settings }
  21.  
  22. { PointTypeConstants }
  23.  
  24.   CHART_NONEMK = 0;
  25.   CHART_RECTMK = 1;
  26.   CHART_CIRCLEMK = 2;
  27.   CHART_TRIANGLEMK = 3;
  28.   CHART_MARBLEMK = 4;
  29.   CHART_CUBEMK = 5;
  30.   CHART_MANYMK = 6;
  31.  
  32. { Scheme Property settings }
  33.  
  34. { SchemeConstants }
  35.  
  36.   CHART_CSSOLID = 0;
  37.   CHART_CSBWPATTERN = 1;
  38.   CHART_CSPATTERN = 2;
  39.  
  40. { Stacked Property settings }
  41.  
  42. { StackedConstants }
  43.  
  44.   CHART_NOSTACKED = 0;
  45.   CHART_STACKED = 1;
  46.   CHART_STACKED100 = 2;
  47.  
  48. { Grid Property settings }
  49.  
  50. { GridConstants }
  51.  
  52.   CHART_NOGRID = 0;
  53.   CHART_HORZGRID = 1;
  54.   CHART_VERTGRID = 2;
  55.   CHART_BOTHGRID = 3;
  56.   CHART_GRIDY2 = 4;
  57.  
  58. { ChartType and Type Properties settings }
  59.  
  60. { GalleryConstants }
  61.  
  62.   LINES = 1;
  63.   BAR = 2;
  64.   SPLINE = 3;
  65.   MARK = 4;
  66.   PIE = 5;
  67.   AREA = 6;
  68.   PARETO = 7;
  69.   SCATTER = 8;
  70.   HILOW = 9;
  71.  
  72. { ConstType Property settings }
  73.  
  74. { ConstTypeConstants }
  75.  
  76.   CC_HIDETEXT = 1;
  77.   CC_HIDE = 2;
  78.  
  79. { LegendStyle Property settings }
  80.  
  81. { LegendStyleConstants }
  82.  
  83.   CL_NOTCLIPPED = 1;
  84.   CL_NOTCHANGECOLOR = 2;
  85.   CL_HIDE = 4;
  86.   CL_HIDEXLEG = 4;
  87.   CL_FORCESERLEG = 8;
  88.   CL_GETLEGEND = 16;
  89.   CL_HIDEYLEG = 32;
  90.  
  91. { Flags for OpenData,OpenDataEx and CloseData Methods }
  92.  
  93. { OpenDataConstants }
  94.  
  95.   COD_VALUES = 1;
  96.   COD_CONSTANTS = 2;
  97.   COD_COLORS = 3;
  98.   COD_STRIPES = 4;
  99.   COD_INIVALUES = 5;
  100.   COD_XVALUES = 6;
  101.   COD_STATUSITEMS = 7;
  102.   COD_UNKNOWN = -1;
  103.   COD_UNCHANGE = 0;
  104.  
  105. { Values for DblClk and RigClk Methods }
  106.  
  107. { ClickConstants }
  108.  
  109.   CHART_BALLOONCLK = 0;
  110.   CHART_DIALOGCLK = 1;
  111.   CHART_NONECLK = 2;
  112.   CHART_MENUCLK = 3;
  113.  
  114. { Values for ShowDialog Method }
  115.  
  116. { DialogConstants }
  117.  
  118.   CDIALOG_EXPORTFILE = 14;
  119.   CDIALOG_IMPORTFILE = 15;
  120.   CDIALOG_WRITETEMPLATE = 8;
  121.   CDIALOG_READTEMPLATE = 9;
  122.   CDIALOG_PAGESETUP = 4;
  123.   CDIALOG_ABOUT = 11;
  124.   CDIALOG_OPTIONS = 12;
  125.   CDIALOG_EDITTITLES = 35;
  126.   CDIALOG_FONTS = 39;
  127.   CDIALOG_ROTATE = 52;
  128.  
  129. { Values for Adm Property }
  130.  
  131. { AdmConstants }
  132.  
  133.   CSA_MIN = 0;
  134.   CSA_MAX = 1;
  135.   CSA_GAP = 2;
  136.   CSA_SCALE = 3;
  137.   CSA_YLEGGAP = 4;
  138.   CSA_PIXXVALUE = 5;
  139.   CSA_XMIN = 6;
  140.   CSA_XMAX = 7;
  141.   CSA_XGAP = 8;
  142.   CSA_LOGBASE = 9;
  143.  
  144. { Values for Title Property }
  145.  
  146. { TitleConstants }
  147.  
  148.   CHART_LEFTTIT = 0;
  149.   CHART_RIGHTTIT = 1;
  150.   CHART_TOPTIT = 2;
  151.   CHART_BOTTOMTIT = 3;
  152.  
  153. { Values for Fonts Property }
  154.  
  155. { FontConstants }
  156.  
  157.   CHART_LEFTFT = 0;
  158.   CHART_RIGHTFT = 1;
  159.   CHART_TOPFT = 2;
  160.   CHART_BOTTOMFT = 3;
  161.   CHART_XLEGFT = 4;
  162.   CHART_YLEGFT = 5;
  163.   CHART_FIXEDFT = 6;
  164.   CHART_LEGENDFT = 7;
  165.  
  166. { ItemStyle,ItemWidth,ItemColor Property indexes }
  167.  
  168. { ItemConstants }
  169.  
  170.   CI_HORZGRID = 0;
  171.   CI_VERTGRID = 1;
  172.  
  173. { DecimalsNum Property indexes }
  174.  
  175. { DecimalConstants }
  176.  
  177.   CD_ALL = 0;
  178.   CD_VALUES = 1;
  179.   CD_YLEG = 2;
  180.   CD_XLEG = 3;
  181.  
  182. const
  183.  
  184. { Component class GUIDs }
  185.   Class_Chartfx: TGUID = '{8996B0A1-D7BE-101B-8650-00AA003A5593}';
  186.  
  187. type
  188.  
  189. { Forward declarations }
  190.   _DChartfx = dispinterface;
  191.   _DChartfxEvents = dispinterface;
  192.  
  193.   PointTypeConstants = TOleEnum;
  194.   SchemeConstants = TOleEnum;
  195.   StackedConstants = TOleEnum;
  196.   GridConstants = TOleEnum;
  197.   GalleryConstants = TOleEnum;
  198.   ConstTypeConstants = TOleEnum;
  199.   LegendStyleConstants = TOleEnum;
  200.   OpenDataConstants = TOleEnum;
  201.   ClickConstants = TOleEnum;
  202.   DialogConstants = TOleEnum;
  203.   AdmConstants = TOleEnum;
  204.   TitleConstants = TOleEnum;
  205.   FontConstants = TOleEnum;
  206.   ItemConstants = TOleEnum;
  207.   DecimalConstants = TOleEnum;
  208.  
  209. { Dispatch interface for ChartFX Control }
  210.  
  211.   _DChartfx = dispinterface
  212.     ['{2DC488B0-D891-101B-8652-00AA003A5593}']
  213.     property DesignDraw: Smallint dispid 4;
  214.     property ThisSerie: Smallint dispid 1;
  215.     property ThisPoint: Smallint dispid 2;
  216.     property AutoInvalidate: WordBool dispid 3;
  217.     property Type_: Integer dispid 5;
  218.     property Style: Integer dispid 6;
  219.     property NSeries: Smallint dispid 7;
  220.     property NValues: Smallint dispid 8;
  221.     property ThisColor: TColor dispid 9;
  222.     property ThisBkColor: TColor dispid 10;
  223.     property LeftGap: Smallint dispid 11;
  224.     property RightGap: Smallint dispid 12;
  225.     property TopGap: Smallint dispid 13;
  226.     property BottomGap: Smallint dispid 14;
  227.     property Decimals: Smallint dispid 15;
  228.     property PointType: Smallint dispid 16;
  229.     property Scheme: Smallint dispid 17;
  230.     property Stacked: Smallint dispid 18;
  231.     property Grid: Smallint dispid 19;
  232.     property WallWidth: Smallint dispid 20;
  233.     property BarHorzGap: Smallint dispid 21;
  234.     property View3D: WordBool dispid 22;
  235.     property Angles3D: Integer dispid 23;
  236.     property PixFactor: Smallint dispid 24;
  237.     property LineWidth: Smallint dispid 25;
  238.     property LineStyle: Smallint dispid 26;
  239.     property LineColor: TColor dispid 27;
  240.     property LineBkColor: TColor dispid 28;
  241.     property FixedWidth: Smallint dispid 29;
  242.     property FixedStyle: Smallint dispid 30;
  243.     property FixedColor: TColor dispid 31;
  244.     property FixedBkColor: TColor dispid 32;
  245.     property FixedGap: Smallint dispid 33;
  246.     property RGBBarHorz: TColor dispid 34;
  247.     property RGBBk: TColor dispid 35;
  248.     property RGB2DBk: TColor dispid 36;
  249.     property RGB3DBk: TColor dispid 37;
  250.     property ShowStatus: WordBool dispid 38;
  251.     property HText: WideString dispid 39;
  252.     property ChartStatus: Smallint dispid 40;
  253.     property Edit: Smallint dispid 41;
  254.     property ChartType: Smallint dispid 42;
  255.     property Chart3D: WordBool dispid 43;
  256.     property ToolBar: WordBool dispid 44;
  257.     property PaletteBar: WordBool dispid 45;
  258.     property PatternBar: WordBool dispid 46;
  259.     property CustTool: Integer dispid 47;
  260.     property ReturnValue: Integer dispid 48;
  261.     property AutoIncrement: WordBool dispid 49;
  262.     property ThisValue: Double dispid 50;
  263.     property VertGridGap: Smallint dispid 51;
  264.     property XLegType: Smallint dispid 52;
  265.     property ConstType: Smallint dispid 53;
  266.     property LeftFont: IFontDisp dispid 54;
  267.     property RightFont: IFontDisp dispid 55;
  268.     property TopFont: IFontDisp dispid 56;
  269.     property BottomFont: IFontDisp dispid 57;
  270.     property XLegFont: IFontDisp dispid 58;
  271.     property YLegFont: IFontDisp dispid 59;
  272.     property FixedFont: IFontDisp dispid 60;
  273.     property LegendFont: IFontDisp dispid 61;
  274.     property LegendWidth: Smallint dispid 62;
  275.     property Enabled: WordBool dispid -514;
  276.     property hWnd: OLE_HANDLE dispid -515;
  277.     property BorderStyle: Smallint dispid -504;
  278.     property hCtlWnd: Integer dispid 63;
  279.     property Value[index: Smallint]: Double dispid 82;
  280.     property XValue[index: Smallint]: Double dispid 83;
  281.     property IniValue[index: Smallint]: Double dispid 84;
  282.     property Const_[index: Smallint]: Double dispid 85;
  283.     property Color[index: Smallint]: TColor dispid 86;
  284.     property BkColor[index: Smallint]: TColor dispid 87;
  285.     property Adm[index: Smallint]: Double dispid 88;
  286.     property Pattern[index: Smallint]: Smallint dispid 89;
  287.     property Fonts[index: Smallint]: Integer dispid 90;
  288.     property Title[index: Smallint]: WideString dispid 91;
  289.     property Legend[index: Smallint]: WideString dispid 92;
  290.     property SerLeg[index: Smallint]: WideString dispid 93;
  291.     property KeyLeg[index: Smallint]: WideString dispid 94;
  292.     property FixLeg[index: Smallint]: WideString dispid 95;
  293.     property YLeg[index: Smallint]: WideString dispid 96;
  294.     property KeySer[index: Smallint]: WideString dispid 97;
  295.     property StatusText[index: Smallint]: WideString dispid 98;
  296.     property RGBFont[index: Smallint]: TColor dispid 99;
  297.     property HFont[index: Smallint]: Smallint dispid 100;
  298.     property ItemWidth[index: Smallint]: Smallint dispid 101;
  299.     property ItemStyle[index: Smallint]: Smallint dispid 102;
  300.     property ItemColor[index: Smallint]: TColor dispid 103;
  301.     property DecimalsNum[index: Smallint]: Smallint dispid 104;
  302.     function OpenDataEx(nType: Smallint; n1, n2: Integer): Integer; dispid 64;
  303.     function CloseData(nType: Smallint): WordBool; dispid 65;
  304.     function DblClk(nType: Smallint; lExtra: Integer): Integer; dispid 66;
  305.     function RigClk(nType: Smallint; lExtra: Integer): Integer; dispid 67;
  306.     function Status(nItems: Smallint; lpStatus: Integer): Integer; dispid 68;
  307.     function ShowDialog(nDialog: Smallint; lExtra: Integer): Integer; dispid 69;
  308.     function PrintIt: Integer; dispid 70;
  309.     function Scroll(wParam, lParam: Integer): Integer; dispid 71;
  310.     function SetStatusItem(index: Smallint; bText: WordBool; nID: Smallint; bFrame: WordBool; nWidth, nMin, nDesp: Smallint; dwStyle: Integer): Integer; dispid 72;
  311.     function Paint(hDC: Integer; nLeft, nTop, nRight, nBottom, wAction: Smallint; lps: Integer): Integer; dispid 73;
  312.     function SetStripe(index: Smallint; dMin, dMax: Double; rgb: TColor): Integer; dispid 74;
  313.     function Language(const sResource: WideString): Integer; dispid 75;
  314.     function ExportFile(const lpszNewValue: WideString): Integer; dispid 76;
  315.     function ImportFile(const lpszNewValue: WideString): Integer; dispid 77;
  316.     function WriteTemplate(const lpszNewValue: WideString): Integer; dispid 78;
  317.     function ReadTemplate(const lpszNewValue: WideString): Integer; dispid 79;
  318.     function CopyData: Integer; dispid 80;
  319.     function CopyBitmap: Integer; dispid 81;
  320.     procedure Refresh; dispid -550;
  321.     procedure AboutBox; dispid -552;
  322.   end;
  323.  
  324. { Event interface for ChartFX Control }
  325.  
  326.   _DChartfxEvents = dispinterface
  327.     ['{2DC488B1-D891-101B-8652-00AA003A5593}']
  328.     procedure LButtonDblClk(var  {IDL_None} X,  {IDL_None} Y,  {IDL_None} nSerie,  {IDL_None} nPoint,  {IDL_None} nRes: Smallint); dispid 1;
  329.     procedure RButtonDown(var  {IDL_None} X,  {IDL_None} Y,  {IDL_None} nSerie,  {IDL_None} nPoint,  {IDL_None} nRes: Smallint); dispid 2;
  330.     procedure ChangeValue(var  {IDL_None} dValue: Double; var  {IDL_None} nSerie,  {IDL_None} nPoint,  {IDL_None} nRes: Smallint); dispid 3;
  331.     procedure ChangeString(var  {IDL_None} nType,  {IDL_None} nIndex,  {IDL_None} nRes: Smallint); dispid 4;
  332.     procedure ChangeColor(var  {IDL_None} nType,  {IDL_None} nIndex,  {IDL_None} nRes: Smallint); dispid 5;
  333.     procedure Destroy; dispid 6;
  334.     procedure ReadFile; dispid 7;
  335.     procedure ChangePalette(var  {IDL_None} nIndex,  {IDL_None} nRes: Smallint); dispid 8;
  336.     procedure ChangeFont(var  {IDL_None} nIndex,  {IDL_None} nRes: Smallint); dispid 9;
  337.     procedure ReadTemplate; dispid 10;
  338.     procedure ChangePattern(var  {IDL_None} nType,  {IDL_None} nIndex,  {IDL_None} nRes: Smallint); dispid 11;
  339.     procedure ChangePattPal(var  {IDL_None} nIndex,  {IDL_None} nRes: Smallint); dispid 12;
  340.     procedure Menu(var  {IDL_None} wParam,  {IDL_None} nSerie,  {IDL_None} nPoint,  {IDL_None} nRes: Smallint); dispid 13;
  341.     procedure ChangeType(var  {IDL_None} nType,  {IDL_None} nRes: Smallint); dispid 14;
  342.     procedure UserScroll(wScrollMsg, wScrollParam: Integer; var  {IDL_None} nRes: Smallint); dispid 15;
  343.     procedure GetLegend(nType: Smallint; var  {IDL_None} nRes: Smallint); dispid 16;
  344.   end;
  345.  
  346. { ChartFX Control }
  347.  
  348.   TChartfxLButtonDblClk = procedure(Sender: TObject; var  {IDL_None} X,  {IDL_None} Y,  {IDL_None} nSerie,  {IDL_None} nPoint,  {IDL_None} nRes: Smallint) of object;
  349.   TChartfxRButtonDown = procedure(Sender: TObject; var  {IDL_None} X,  {IDL_None} Y,  {IDL_None} nSerie,  {IDL_None} nPoint,  {IDL_None} nRes: Smallint) of object;
  350.   TChartfxChangeValue = procedure(Sender: TObject; var  {IDL_None} dValue: Double; var  {IDL_None} nSerie,  {IDL_None} nPoint,  {IDL_None} nRes: Smallint) of object;
  351.   TChartfxChangeString = procedure(Sender: TObject; var  {IDL_None} nType,  {IDL_None} nIndex,  {IDL_None} nRes: Smallint) of object;
  352.   TChartfxChangeColor = procedure(Sender: TObject; var  {IDL_None} nType,  {IDL_None} nIndex,  {IDL_None} nRes: Smallint) of object;
  353.   TChartfxChangePalette = procedure(Sender: TObject; var  {IDL_None} nIndex,  {IDL_None} nRes: Smallint) of object;
  354.   TChartfxChangeFont = procedure(Sender: TObject; var  {IDL_None} nIndex,  {IDL_None} nRes: Smallint) of object;
  355.   TChartfxChangePattern = procedure(Sender: TObject; var  {IDL_None} nType,  {IDL_None} nIndex,  {IDL_None} nRes: Smallint) of object;
  356.   TChartfxChangePattPal = procedure(Sender: TObject; var  {IDL_None} nIndex,  {IDL_None} nRes: Smallint) of object;
  357.   TChartfxMenu = procedure(Sender: TObject; var  {IDL_None} wParam,  {IDL_None} nSerie,  {IDL_None} nPoint,  {IDL_None} nRes: Smallint) of object;
  358.   TChartfxChangeType = procedure(Sender: TObject; var  {IDL_None} nType,  {IDL_None} nRes: Smallint) of object;
  359.   TChartfxUserScroll = procedure(Sender: TObject; wScrollMsg, wScrollParam: Integer; var  {IDL_None} nRes: Smallint) of object;
  360.   TChartfxGetLegend = procedure(Sender: TObject; nType: Smallint; var  {IDL_None} nRes: Smallint) of object;
  361.  
  362.   TChartfx = class(TOleControl)
  363.   private
  364.     FOnLButtonDblClk: TChartfxLButtonDblClk;
  365.     FOnRButtonDown: TChartfxRButtonDown;
  366.     FOnChangeValue: TChartfxChangeValue;
  367.     FOnChangeString: TChartfxChangeString;
  368.     FOnChangeColor: TChartfxChangeColor;
  369.     FOnDestroy: TNotifyEvent;
  370.     FOnReadFile: TNotifyEvent;
  371.     FOnChangePalette: TChartfxChangePalette;
  372.     FOnChangeFont: TChartfxChangeFont;
  373.     FOnReadTemplate: TNotifyEvent;
  374.     FOnChangePattern: TChartfxChangePattern;
  375.     FOnChangePattPal: TChartfxChangePattPal;
  376.     FOnMenu: TChartfxMenu;
  377.     FOnChangeType: TChartfxChangeType;
  378.     FOnUserScroll: TChartfxUserScroll;
  379.     FOnGetLegend: TChartfxGetLegend;
  380.     FIntf: _DChartfx;
  381.     function Get_hWnd: OLE_HANDLE;
  382.     procedure Set_hWnd(var Value: OLE_HANDLE);
  383.     function Get_Value(index: Smallint): Double;
  384.     procedure Set_Value(index: Smallint; Value: Double);
  385.     function Get_XValue(index: Smallint): Double;
  386.     procedure Set_XValue(index: Smallint; Value: Double);
  387.     function Get_IniValue(index: Smallint): Double;
  388.     procedure Set_IniValue(index: Smallint; Value: Double);
  389.     function Get_Const_(index: Smallint): Double;
  390.     procedure Set_Const_(index: Smallint; Value: Double);
  391.     function Get_Color(index: Smallint): TColor;
  392.     procedure Set_Color(index: Smallint; Value: TColor);
  393.     function Get_BkColor(index: Smallint): TColor;
  394.     procedure Set_BkColor(index: Smallint; Value: TColor);
  395.     function Get_Adm(index: Smallint): Double;
  396.     procedure Set_Adm(index: Smallint; Value: Double);
  397.     function Get_Pattern(index: Smallint): Smallint;
  398.     procedure Set_Pattern(index: Smallint; Value: Smallint);
  399.     function Get_Fonts(index: Smallint): Integer;
  400.     procedure Set_Fonts(index: Smallint; Value: Integer);
  401.     function Get_Title(index: Smallint): WideString;
  402.     procedure Set_Title(index: Smallint; const Value: WideString);
  403.     function Get_Legend(index: Smallint): WideString;
  404.     procedure Set_Legend(index: Smallint; const Value: WideString);
  405.     function Get_SerLeg(index: Smallint): WideString;
  406.     procedure Set_SerLeg(index: Smallint; const Value: WideString);
  407.     function Get_KeyLeg(index: Smallint): WideString;
  408.     procedure Set_KeyLeg(index: Smallint; const Value: WideString);
  409.     function Get_FixLeg(index: Smallint): WideString;
  410.     procedure Set_FixLeg(index: Smallint; const Value: WideString);
  411.     function Get_YLeg(index: Smallint): WideString;
  412.     procedure Set_YLeg(index: Smallint; const Value: WideString);
  413.     function Get_KeySer(index: Smallint): WideString;
  414.     procedure Set_KeySer(index: Smallint; const Value: WideString);
  415.     function Get_StatusText(index: Smallint): WideString;
  416.     procedure Set_StatusText(index: Smallint; const Value: WideString);
  417.     function Get_RGBFont(index: Smallint): TColor;
  418.     procedure Set_RGBFont(index: Smallint; Value: TColor);
  419.     function Get_HFont(index: Smallint): Smallint;
  420.     procedure Set_HFont(index: Smallint; Value: Smallint);
  421.     function Get_ItemWidth(index: Smallint): Smallint;
  422.     procedure Set_ItemWidth(index: Smallint; Value: Smallint);
  423.     function Get_ItemStyle(index: Smallint): Smallint;
  424.     procedure Set_ItemStyle(index: Smallint; Value: Smallint);
  425.     function Get_ItemColor(index: Smallint): TColor;
  426.     procedure Set_ItemColor(index: Smallint; Value: TColor);
  427.     function Get_DecimalsNum(index: Smallint): Smallint;
  428.     procedure Set_DecimalsNum(index: Smallint; Value: Smallint);
  429.   protected
  430.     procedure InitControlData; override;
  431.     procedure InitControlInterface(const Obj: IUnknown); override;
  432.   public
  433.     function OpenDataEx(nType: Smallint; n1, n2: Integer): Integer;
  434.     function CloseData(nType: Smallint): WordBool;
  435.     function DblClk(nType: Smallint; lExtra: Integer): Integer;
  436.     function RigClk(nType: Smallint; lExtra: Integer): Integer;
  437.     function Status(nItems: Smallint; lpStatus: Integer): Integer;
  438.     function ShowDialog(nDialog: Smallint; lExtra: Integer): Integer;
  439.     function PrintIt: Integer;
  440.     function Scroll(wParam, lParam: Integer): Integer;
  441.     function SetStatusItem(index: Smallint; bText: WordBool; nID: Smallint; bFrame: WordBool; nWidth, nMin, nDesp: Smallint; dwStyle: Integer): Integer;
  442.     function Paint(hDC: Integer; nLeft, nTop, nRight, nBottom, wAction: Smallint; lps: Integer): Integer;
  443.     function SetStripe(index: Smallint; dMin, dMax: Double; rgb: TColor): Integer;
  444.     function Language(const sResource: WideString): Integer;
  445.     function ExportFile(const lpszNewValue: WideString): Integer;
  446.     function ImportFile(const lpszNewValue: WideString): Integer;
  447.     function WriteTemplate(const lpszNewValue: WideString): Integer;
  448.     function ReadTemplate(const lpszNewValue: WideString): Integer;
  449.     function CopyData: Integer;
  450.     function CopyBitmap: Integer;
  451.     procedure Refresh;
  452.     procedure AboutBox;
  453.     property ControlInterface: _DChartfx read FIntf;
  454.     property Value[index: Smallint]: Double read Get_Value write Set_Value;
  455.     property XValue[index: Smallint]: Double read Get_XValue write Set_XValue;
  456.     property IniValue[index: Smallint]: Double read Get_IniValue write Set_IniValue;
  457.     property Const_[index: Smallint]: Double read Get_Const_ write Set_Const_;
  458.     property Color[index: Smallint]: TColor read Get_Color write Set_Color;
  459.     property BkColor[index: Smallint]: TColor read Get_BkColor write Set_BkColor;
  460.     property Adm[index: Smallint]: Double read Get_Adm write Set_Adm;
  461.     property Pattern[index: Smallint]: Smallint read Get_Pattern write Set_Pattern;
  462.     property Fonts[index: Smallint]: Integer read Get_Fonts write Set_Fonts;
  463.     property Title[index: Smallint]: WideString read Get_Title write Set_Title;
  464.     property Legend[index: Smallint]: WideString read Get_Legend write Set_Legend;
  465.     property SerLeg[index: Smallint]: WideString read Get_SerLeg write Set_SerLeg;
  466.     property KeyLeg[index: Smallint]: WideString read Get_KeyLeg write Set_KeyLeg;
  467.     property FixLeg[index: Smallint]: WideString read Get_FixLeg write Set_FixLeg;
  468.     property YLeg[index: Smallint]: WideString read Get_YLeg write Set_YLeg;
  469.     property KeySer[index: Smallint]: WideString read Get_KeySer write Set_KeySer;
  470.     property StatusText[index: Smallint]: WideString read Get_StatusText write Set_StatusText;
  471.     property RGBFont[index: Smallint]: TColor read Get_RGBFont write Set_RGBFont;
  472.     property HFont[index: Smallint]: Smallint read Get_HFont write Set_HFont;
  473.     property ItemWidth[index: Smallint]: Smallint read Get_ItemWidth write Set_ItemWidth;
  474.     property ItemStyle[index: Smallint]: Smallint read Get_ItemStyle write Set_ItemStyle;
  475.     property ItemColor[index: Smallint]: TColor read Get_ItemColor write Set_ItemColor;
  476.     property DecimalsNum[index: Smallint]: Smallint read Get_DecimalsNum write Set_DecimalsNum;
  477.   published
  478.     property TabStop;
  479.     property DragCursor;
  480.     property DragMode;
  481.     property ParentShowHint;
  482.     property PopupMenu;
  483.     property ShowHint;
  484.     property TabOrder;
  485.     property Visible;
  486.     property OnDragDrop;
  487.     property OnDragOver;
  488.     property OnEndDrag;
  489.     property OnEnter;
  490.     property OnExit;
  491.     property OnStartDrag;
  492.     property DesignDraw: Smallint index 4 read GetSmallintProp write SetSmallintProp stored False;
  493.     property ThisSerie: Smallint index 1 read GetSmallintProp write SetSmallintProp stored False;
  494.     property ThisPoint: Smallint index 2 read GetSmallintProp write SetSmallintProp stored False;
  495.     property AutoInvalidate: WordBool index 3 read GetWordBoolProp write SetWordBoolProp stored False;
  496.     property Type_: Integer index 5 read GetIntegerProp write SetIntegerProp stored False;
  497.     property Style: Integer index 6 read GetIntegerProp write SetIntegerProp stored False;
  498.     property NSeries: Smallint index 7 read GetSmallintProp write SetSmallintProp stored False;
  499.     property NValues: Smallint index 8 read GetSmallintProp write SetSmallintProp stored False;
  500.     property ThisColor: TColor index 9 read GetTColorProp write SetTColorProp stored False;
  501.     property ThisBkColor: TColor index 10 read GetTColorProp write SetTColorProp stored False;
  502.     property LeftGap: Smallint index 11 read GetSmallintProp write SetSmallintProp stored False;
  503.     property RightGap: Smallint index 12 read GetSmallintProp write SetSmallintProp stored False;
  504.     property TopGap: Smallint index 13 read GetSmallintProp write SetSmallintProp stored False;
  505.     property BottomGap: Smallint index 14 read GetSmallintProp write SetSmallintProp stored False;
  506.     property Decimals: Smallint index 15 read GetSmallintProp write SetSmallintProp stored False;
  507.     property PointType: Smallint index 16 read GetSmallintProp write SetSmallintProp stored False;
  508.     property Scheme: Smallint index 17 read GetSmallintProp write SetSmallintProp stored False;
  509.     property Stacked: Smallint index 18 read GetSmallintProp write SetSmallintProp stored False;
  510.     property Grid: Smallint index 19 read GetSmallintProp write SetSmallintProp stored False;
  511.     property WallWidth: Smallint index 20 read GetSmallintProp write SetSmallintProp stored False;
  512.     property BarHorzGap: Smallint index 21 read GetSmallintProp write SetSmallintProp stored False;
  513.     property View3D: WordBool index 22 read GetWordBoolProp write SetWordBoolProp stored False;
  514.     property Angles3D: Integer index 23 read GetIntegerProp write SetIntegerProp stored False;
  515.     property PixFactor: Smallint index 24 read GetSmallintProp write SetSmallintProp stored False;
  516.     property LineWidth: Smallint index 25 read GetSmallintProp write SetSmallintProp stored False;
  517.     property LineStyle: Smallint index 26 read GetSmallintProp write SetSmallintProp stored False;
  518.     property LineColor: TColor index 27 read GetTColorProp write SetTColorProp stored False;
  519.     property LineBkColor: TColor index 28 read GetTColorProp write SetTColorProp stored False;
  520.     property FixedWidth: Smallint index 29 read GetSmallintProp write SetSmallintProp stored False;
  521.     property FixedStyle: Smallint index 30 read GetSmallintProp write SetSmallintProp stored False;
  522.     property FixedColor: TColor index 31 read GetTColorProp write SetTColorProp stored False;
  523.     property FixedBkColor: TColor index 32 read GetTColorProp write SetTColorProp stored False;
  524.     property FixedGap: Smallint index 33 read GetSmallintProp write SetSmallintProp stored False;
  525.     property RGBBarHorz: TColor index 34 read GetTColorProp write SetTColorProp stored False;
  526.     property RGBBk: TColor index 35 read GetTColorProp write SetTColorProp stored False;
  527.     property RGB2DBk: TColor index 36 read GetTColorProp write SetTColorProp stored False;
  528.     property RGB3DBk: TColor index 37 read GetTColorProp write SetTColorProp stored False;
  529.     property ShowStatus: WordBool index 38 read GetWordBoolProp write SetWordBoolProp stored False;
  530.     property HText: WideString index 39 read GetWideStringProp write SetWideStringProp stored False;
  531.     property ChartStatus: Smallint index 40 read GetSmallintProp write SetSmallintProp stored False;
  532.     property Edit: Smallint index 41 read GetSmallintProp write SetSmallintProp stored False;
  533.     property ChartType: Smallint index 42 read GetSmallintProp write SetSmallintProp stored False;
  534.     property Chart3D: WordBool index 43 read GetWordBoolProp write SetWordBoolProp stored False;
  535.     property ToolBar: WordBool index 44 read GetWordBoolProp write SetWordBoolProp stored False;
  536.     property PaletteBar: WordBool index 45 read GetWordBoolProp write SetWordBoolProp stored False;
  537.     property PatternBar: WordBool index 46 read GetWordBoolProp write SetWordBoolProp stored False;
  538.     property CustTool: Integer index 47 read GetIntegerProp write SetIntegerProp stored False;
  539.     property ReturnValue: Integer index 48 read GetIntegerProp write SetIntegerProp stored False;
  540.     property AutoIncrement: WordBool index 49 read GetWordBoolProp write SetWordBoolProp stored False;
  541.     property ThisValue: Double index 50 read GetDoubleProp write SetDoubleProp stored False;
  542.     property VertGridGap: Smallint index 51 read GetSmallintProp write SetSmallintProp stored False;
  543.     property XLegType: Smallint index 52 read GetSmallintProp write SetSmallintProp stored False;
  544.     property ConstType: Smallint index 53 read GetSmallintProp write SetSmallintProp stored False;
  545.     property LeftFont: TFont index 54 read GetTFontProp write SetTFontProp stored False;
  546.     property RightFont: TFont index 55 read GetTFontProp write SetTFontProp stored False;
  547.     property TopFont: TFont index 56 read GetTFontProp write SetTFontProp stored False;
  548.     property BottomFont: TFont index 57 read GetTFontProp write SetTFontProp stored False;
  549.     property XLegFont: TFont index 58 read GetTFontProp write SetTFontProp stored False;
  550.     property YLegFont: TFont index 59 read GetTFontProp write SetTFontProp stored False;
  551.     property FixedFont: TFont index 60 read GetTFontProp write SetTFontProp stored False;
  552.     property LegendFont: TFont index 61 read GetTFontProp write SetTFontProp stored False;
  553.     property LegendWidth: Smallint index 62 read GetSmallintProp write SetSmallintProp stored False;
  554.     property Enabled: WordBool index -514 read GetWordBoolProp write SetWordBoolProp stored False;
  555.     property hWnd: OLE_HANDLE read Get_hWnd write Set_hWnd stored False;
  556.     property BorderStyle: Smallint index -504 read GetSmallintProp write SetSmallintProp stored False;
  557.     property hCtlWnd: Integer index 63 read GetIntegerProp write SetIntegerProp stored False;
  558.     property OnLButtonDblClk: TChartfxLButtonDblClk read FOnLButtonDblClk write FOnLButtonDblClk;
  559.     property OnRButtonDown: TChartfxRButtonDown read FOnRButtonDown write FOnRButtonDown;
  560.     property OnChangeValue: TChartfxChangeValue read FOnChangeValue write FOnChangeValue;
  561.     property OnChangeString: TChartfxChangeString read FOnChangeString write FOnChangeString;
  562.     property OnChangeColor: TChartfxChangeColor read FOnChangeColor write FOnChangeColor;
  563.     property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy;
  564.     property OnReadFile: TNotifyEvent read FOnReadFile write FOnReadFile;
  565.     property OnChangePalette: TChartfxChangePalette read FOnChangePalette write FOnChangePalette;
  566.     property OnChangeFont: TChartfxChangeFont read FOnChangeFont write FOnChangeFont;
  567.     property OnReadTemplate: TNotifyEvent read FOnReadTemplate write FOnReadTemplate;
  568.     property OnChangePattern: TChartfxChangePattern read FOnChangePattern write FOnChangePattern;
  569.     property OnChangePattPal: TChartfxChangePattPal read FOnChangePattPal write FOnChangePattPal;
  570.     property OnMenu: TChartfxMenu read FOnMenu write FOnMenu;
  571.     property OnChangeType: TChartfxChangeType read FOnChangeType write FOnChangeType;
  572.     property OnUserScroll: TChartfxUserScroll read FOnUserScroll write FOnUserScroll;
  573.     property OnGetLegend: TChartfxGetLegend read FOnGetLegend write FOnGetLegend;
  574.   end;
  575.  
  576. procedure Register;
  577.  
  578. implementation
  579.  
  580. uses ComObj;
  581.  
  582. procedure TChartfx.InitControlData;
  583. const
  584.   CEventDispIDs: array[0..15] of Integer = (
  585.     $00000001, $00000002, $00000003, $00000004, $00000005, $00000006,
  586.     $00000007, $00000008, $00000009, $0000000A, $0000000B, $0000000C,
  587.     $0000000D, $0000000E, $0000000F, $00000010);
  588.   CLicenseKey: array[0..71] of Word = (
  589.     $0043, $0068, $0061, $0072, $0074, $0020, $0046, $0058, $0020, $0032,
  590.     $002E, $0030, $0020, $004F, $0043, $0058, $0033, $0032, $0020, $0028,
  591.     $0033, $0032, $0020, $0042, $0069, $0074, $0073, $0029, $002E, $0020,
  592.     $0043, $006F, $0070, $0079, $0072, $0069, $0067, $0068, $0074, $0020,
  593.     $0028, $0063, $0029, $0020, $0031, $0039, $0039, $0034, $0020, $0053,
  594.     $006F, $0066, $0074, $0077, $0061, $0072, $0065, $0020, $0046, $0058,
  595.     $002C, $0020, $0049, $006E, $0063, $002E, $002D, $0031, $0039, $0039,
  596.     $0035, $0000);
  597.   CFontIDs: array [0..7] of Integer = (
  598.     $00000036, $00000037, $00000038, $00000039, $0000003A, $0000003B,
  599.     $0000003C, $0000003D);
  600.   CControlData: TControlData = (
  601.     ClassID: '{8996B0A1-D7BE-101B-8650-00AA003A5593}';
  602.     EventIID: '{2DC488B1-D891-101B-8652-00AA003A5593}';
  603.     EventCount: 16;
  604.     EventDispIDs: @CEventDispIDs;
  605.     LicenseKey: @CLicenseKey;
  606.     Flags: $00000008;
  607.     Version: 300;
  608.     FontCount: 8;
  609.     FontIDs: @CFontIDs);
  610. begin
  611.   ControlData := @CControlData;
  612. end;
  613.  
  614. procedure TChartfx.InitControlInterface(const Obj: IUnknown);
  615. begin
  616.   FIntf := Obj as _DChartfx;
  617. end;
  618.  
  619. function TChartfx.OpenDataEx(nType: Smallint; n1, n2: Integer): Integer;
  620. begin
  621.   Result := ControlInterface.OpenDataEx(nType, n1, n2);
  622. end;
  623.  
  624. function TChartfx.CloseData(nType: Smallint): WordBool;
  625. begin
  626.   Result := ControlInterface.CloseData(nType);
  627. end;
  628.  
  629. function TChartfx.DblClk(nType: Smallint; lExtra: Integer): Integer;
  630. begin
  631.   Result := ControlInterface.DblClk(nType, lExtra);
  632. end;
  633.  
  634. function TChartfx.RigClk(nType: Smallint; lExtra: Integer): Integer;
  635. begin
  636.   Result := ControlInterface.RigClk(nType, lExtra);
  637. end;
  638.  
  639. function TChartfx.Status(nItems: Smallint; lpStatus: Integer): Integer;
  640. begin
  641.   Result := ControlInterface.Status(nItems, lpStatus);
  642. end;
  643.  
  644. function TChartfx.ShowDialog(nDialog: Smallint; lExtra: Integer): Integer;
  645. begin
  646.   Result := ControlInterface.ShowDialog(nDialog, lExtra);
  647. end;
  648.  
  649. function TChartfx.PrintIt: Integer;
  650. begin
  651.   Result := ControlInterface.PrintIt;
  652. end;
  653.  
  654. function TChartfx.Scroll(wParam, lParam: Integer): Integer;
  655. begin
  656.   Result := ControlInterface.Scroll(wParam, lParam);
  657. end;
  658.  
  659. function TChartfx.SetStatusItem(index: Smallint; bText: WordBool; nID: Smallint; bFrame: WordBool; nWidth, nMin, nDesp: Smallint; dwStyle: Integer): Integer;
  660. begin
  661.   Result := ControlInterface.SetStatusItem(index, bText, nID, bFrame, nWidth, nMin, nDesp, dwStyle);
  662. end;
  663.  
  664. function TChartfx.Paint(hDC: Integer; nLeft, nTop, nRight, nBottom, wAction: Smallint; lps: Integer): Integer;
  665. begin
  666.   Result := ControlInterface.Paint(hDC, nLeft, nTop, nRight, nBottom, wAction, lps);
  667. end;
  668.  
  669. function TChartfx.SetStripe(index: Smallint; dMin, dMax: Double; rgb: TColor): Integer;
  670. begin
  671.   Result := ControlInterface.SetStripe(index, dMin, dMax, rgb);
  672. end;
  673.  
  674. function TChartfx.Language(const sResource: WideString): Integer;
  675. begin
  676.   Result := ControlInterface.Language(sResource);
  677. end;
  678.  
  679. function TChartfx.ExportFile(const lpszNewValue: WideString): Integer;
  680. begin
  681.   Result := ControlInterface.ExportFile(lpszNewValue);
  682. end;
  683.  
  684. function TChartfx.ImportFile(const lpszNewValue: WideString): Integer;
  685. begin
  686.   Result := ControlInterface.ImportFile(lpszNewValue);
  687. end;
  688.  
  689. function TChartfx.WriteTemplate(const lpszNewValue: WideString): Integer;
  690. begin
  691.   Result := ControlInterface.WriteTemplate(lpszNewValue);
  692. end;
  693.  
  694. function TChartfx.ReadTemplate(const lpszNewValue: WideString): Integer;
  695. begin
  696.   Result := ControlInterface.ReadTemplate(lpszNewValue);
  697. end;
  698.  
  699. function TChartfx.CopyData: Integer;
  700. begin
  701.   Result := ControlInterface.CopyData;
  702. end;
  703.  
  704. function TChartfx.CopyBitmap: Integer;
  705. begin
  706.   Result := ControlInterface.CopyBitmap;
  707. end;
  708.  
  709. procedure TChartfx.Refresh;
  710. begin
  711.   ControlInterface.Refresh;
  712. end;
  713.  
  714. procedure TChartfx.AboutBox;
  715. begin
  716.   ControlInterface.AboutBox;
  717. end;
  718.  
  719. function TChartfx.Get_hWnd: OLE_HANDLE;
  720. begin
  721.   Result := ControlInterface.hWnd;
  722. end;
  723.  
  724. procedure TChartfx.Set_hWnd(var Value: OLE_HANDLE);
  725. begin
  726.   ControlInterface.hWnd := Value;
  727. end;
  728.  
  729. function TChartfx.Get_Value(index: Smallint): Double;
  730. begin
  731.   Result := ControlInterface.Value[index];
  732. end;
  733.  
  734. procedure TChartfx.Set_Value(index: Smallint; Value: Double);
  735. begin
  736.   ControlInterface.Value[index] := Value;
  737. end;
  738.  
  739. function TChartfx.Get_XValue(index: Smallint): Double;
  740. begin
  741.   Result := ControlInterface.XValue[index];
  742. end;
  743.  
  744. procedure TChartfx.Set_XValue(index: Smallint; Value: Double);
  745. begin
  746.   ControlInterface.XValue[index] := Value;
  747. end;
  748.  
  749. function TChartfx.Get_IniValue(index: Smallint): Double;
  750. begin
  751.   Result := ControlInterface.IniValue[index];
  752. end;
  753.  
  754. procedure TChartfx.Set_IniValue(index: Smallint; Value: Double);
  755. begin
  756.   ControlInterface.IniValue[index] := Value;
  757. end;
  758.  
  759. function TChartfx.Get_Const_(index: Smallint): Double;
  760. begin
  761.   Result := ControlInterface.Const_[index];
  762. end;
  763.  
  764. procedure TChartfx.Set_Const_(index: Smallint; Value: Double);
  765. begin
  766.   ControlInterface.Const_[index] := Value;
  767. end;
  768.  
  769. function TChartfx.Get_Color(index: Smallint): TColor;
  770. begin
  771.   Result := ControlInterface.Color[index];
  772. end;
  773.  
  774. procedure TChartfx.Set_Color(index: Smallint; Value: TColor);
  775. begin
  776.   ControlInterface.Color[index] := Value;
  777. end;
  778.  
  779. function TChartfx.Get_BkColor(index: Smallint): TColor;
  780. begin
  781.   Result := ControlInterface.BkColor[index];
  782. end;
  783.  
  784. procedure TChartfx.Set_BkColor(index: Smallint; Value: TColor);
  785. begin
  786.   ControlInterface.BkColor[index] := Value;
  787. end;
  788.  
  789. function TChartfx.Get_Adm(index: Smallint): Double;
  790. begin
  791.   Result := ControlInterface.Adm[index];
  792. end;
  793.  
  794. procedure TChartfx.Set_Adm(index: Smallint; Value: Double);
  795. begin
  796.   ControlInterface.Adm[index] := Value;
  797. end;
  798.  
  799. function TChartfx.Get_Pattern(index: Smallint): Smallint;
  800. begin
  801.   Result := ControlInterface.Pattern[index];
  802. end;
  803.  
  804. procedure TChartfx.Set_Pattern(index: Smallint; Value: Smallint);
  805. begin
  806.   ControlInterface.Pattern[index] := Value;
  807. end;
  808.  
  809. function TChartfx.Get_Fonts(index: Smallint): Integer;
  810. begin
  811.   Result := ControlInterface.Fonts[index];
  812. end;
  813.  
  814. procedure TChartfx.Set_Fonts(index: Smallint; Value: Integer);
  815. begin
  816.   ControlInterface.Fonts[index] := Value;
  817. end;
  818.  
  819. function TChartfx.Get_Title(index: Smallint): WideString;
  820. begin
  821.   Result := ControlInterface.Title[index];
  822. end;
  823.  
  824. procedure TChartfx.Set_Title(index: Smallint; const Value: WideString);
  825. begin
  826.   ControlInterface.Title[index] := Value;
  827. end;
  828.  
  829. function TChartfx.Get_Legend(index: Smallint): WideString;
  830. begin
  831.   Result := ControlInterface.Legend[index];
  832. end;
  833.  
  834. procedure TChartfx.Set_Legend(index: Smallint; const Value: WideString);
  835. begin
  836.   ControlInterface.Legend[index] := Value;
  837. end;
  838.  
  839. function TChartfx.Get_SerLeg(index: Smallint): WideString;
  840. begin
  841.   Result := ControlInterface.SerLeg[index];
  842. end;
  843.  
  844. procedure TChartfx.Set_SerLeg(index: Smallint; const Value: WideString);
  845. begin
  846.   ControlInterface.SerLeg[index] := Value;
  847. end;
  848.  
  849. function TChartfx.Get_KeyLeg(index: Smallint): WideString;
  850. begin
  851.   Result := ControlInterface.KeyLeg[index];
  852. end;
  853.  
  854. procedure TChartfx.Set_KeyLeg(index: Smallint; const Value: WideString);
  855. begin
  856.   ControlInterface.KeyLeg[index] := Value;
  857. end;
  858.  
  859. function TChartfx.Get_FixLeg(index: Smallint): WideString;
  860. begin
  861.   Result := ControlInterface.FixLeg[index];
  862. end;
  863.  
  864. procedure TChartfx.Set_FixLeg(index: Smallint; const Value: WideString);
  865. begin
  866.   ControlInterface.FixLeg[index] := Value;
  867. end;
  868.  
  869. function TChartfx.Get_YLeg(index: Smallint): WideString;
  870. begin
  871.   Result := ControlInterface.YLeg[index];
  872. end;
  873.  
  874. procedure TChartfx.Set_YLeg(index: Smallint; const Value: WideString);
  875. begin
  876.   ControlInterface.YLeg[index] := Value;
  877. end;
  878.  
  879. function TChartfx.Get_KeySer(index: Smallint): WideString;
  880. begin
  881.   Result := ControlInterface.KeySer[index];
  882. end;
  883.  
  884. procedure TChartfx.Set_KeySer(index: Smallint; const Value: WideString);
  885. begin
  886.   ControlInterface.KeySer[index] := Value;
  887. end;
  888.  
  889. function TChartfx.Get_StatusText(index: Smallint): WideString;
  890. begin
  891.   Result := ControlInterface.StatusText[index];
  892. end;
  893.  
  894. procedure TChartfx.Set_StatusText(index: Smallint; const Value: WideString);
  895. begin
  896.   ControlInterface.StatusText[index] := Value;
  897. end;
  898.  
  899. function TChartfx.Get_RGBFont(index: Smallint): TColor;
  900. begin
  901.   Result := ControlInterface.RGBFont[index];
  902. end;
  903.  
  904. procedure TChartfx.Set_RGBFont(index: Smallint; Value: TColor);
  905. begin
  906.   ControlInterface.RGBFont[index] := Value;
  907. end;
  908.  
  909. function TChartfx.Get_HFont(index: Smallint): Smallint;
  910. begin
  911.   Result := ControlInterface.HFont[index];
  912. end;
  913.  
  914. procedure TChartfx.Set_HFont(index: Smallint; Value: Smallint);
  915. begin
  916.   ControlInterface.HFont[index] := Value;
  917. end;
  918.  
  919. function TChartfx.Get_ItemWidth(index: Smallint): Smallint;
  920. begin
  921.   Result := ControlInterface.ItemWidth[index];
  922. end;
  923.  
  924. procedure TChartfx.Set_ItemWidth(index: Smallint; Value: Smallint);
  925. begin
  926.   ControlInterface.ItemWidth[index] := Value;
  927. end;
  928.  
  929. function TChartfx.Get_ItemStyle(index: Smallint): Smallint;
  930. begin
  931.   Result := ControlInterface.ItemStyle[index];
  932. end;
  933.  
  934. procedure TChartfx.Set_ItemStyle(index: Smallint; Value: Smallint);
  935. begin
  936.   ControlInterface.ItemStyle[index] := Value;
  937. end;
  938.  
  939. function TChartfx.Get_ItemColor(index: Smallint): TColor;
  940. begin
  941.   Result := ControlInterface.ItemColor[index];
  942. end;
  943.  
  944. procedure TChartfx.Set_ItemColor(index: Smallint; Value: TColor);
  945. begin
  946.   ControlInterface.ItemColor[index] := Value;
  947. end;
  948.  
  949. function TChartfx.Get_DecimalsNum(index: Smallint): Smallint;
  950. begin
  951.   Result := ControlInterface.DecimalsNum[index];
  952. end;
  953.  
  954. procedure TChartfx.Set_DecimalsNum(index: Smallint; Value: Smallint);
  955. begin
  956.   ControlInterface.DecimalsNum[index] := Value;
  957. end;
  958.  
  959.  
  960. procedure Register;
  961. begin
  962.   RegisterComponents('ActiveX', [TChartfx]);
  963.   RegisterNonActiveX([TChartfx]);
  964. end;
  965.  
  966. end.
  967.